package Annotation;

import java.lang.reflect.Method;

public class MainAnnotation
{
    public static void main(String[] args) {
        
        Class cls = TestAnnotation.class;
        Method[] allMethods = cls.getDeclaredMethods();
        try {
            for(int i = 0; i < allMethods.length; i++){
               if(allMethods[i].getAnnotation(PrintMethod.class) != null)
                    System.out.println(allMethods[i].getName());                   
            }
        }
        catch (Exception e) {
        }
        return;
        
    }

}
